home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_DYTNA.ZIP / Daytona.txt < prev    next >
Text File  |  1998-06-10  |  12KB  |  243 lines

  1.  
  2. Free Information Xchange '97 presents:
  3.  
  4. Daytona USA - CD Crack by Static Vengeance
  5.  
  6. Requirements:
  7. Hex Editor and Full game install
  8.  
  9.     I'm going to show you how I cracked this game from SEGA Entertainment with W32Dasm from URSoft.  The first thing to do
  10. is to disassemble daytona.exe...  Now Select Refs from the menu bar and choose 'String data references'.  Grab the slider bar
  11. and scroll down a bit looking for the CD volume name (Daytona usa) and/or something like "insert..." or "please insert.."
  12.     Eventually you come down to "Please insert DAYTONA USA CD."  Now double click on this and W32Dasm will take you to the
  13. place in the program listing that references that string.  Now of course you have to have "some" knowlegde of assembly code.  I
  14. got mine from the 6502 & 65816 processors and I have been able to adapt quickly to some of the x86 op-codes, anyways here is
  15. what you see:
  16.  
  17. * Referenced by a CALL at Addresses:
  18. |:00405067   , :004050A5   , :00405275   , :004052A2   , :004054AE   
  19. |:00416007   , :0043F207   
  20. |
  21. :00422420 53                      push ebx
  22. :00422421 E8FA83FFFF              call 0041A820
  23. :00422426 6A05                    push 00000005
  24.  
  25. * Possible StringData Ref from Data Obj ->"DAYTONA USA"
  26.                                   |
  27. :00422428 A1B8AB4800              mov eax, dword ptr [0048ABB8]
  28. :0042242D 50                      push eax
  29. :0042242E 8B0D8884C500            mov ecx, dword ptr [00C58488]
  30.  
  31. * Possible StringData Ref from Data Obj ->"Please insert DAYTONA USA CD."  <-- String that got us here
  32.                                   |
  33. :00422434 68CC624800              push 004862CC
  34. :00422439 51                      push ecx
  35.  
  36. * Reference To: USER32.MessageBoxA, Ord:0197h
  37.                                   |
  38. :0042243A FF15A0841D01            Call dword ptr [011D84A0]
  39. :00422440 83F804                  cmp eax, 00000004
  40. :00422443 7405                    je 0042244A
  41. :00422445 E8263D0200              call 00446170
  42.  
  43. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  44. |:00422443(C)
  45. |
  46. :0042244A 5B                      pop ebx
  47. :0042244B C3                      ret
  48.  
  49.     Well, here is the text and the pop dialog header.  Now the fun begins, you need to go back and look through the reference
  50. calls.  Well to make a long story shorter... I didn't find what I was looking for in any of those places... I traced forwards and
  51. backwards looking for clues... I started "NOP'ing" calls out and it had no effect at all...  Two things could be the problem.. I don't
  52. know enough OR there's a second reference to the 'insert CD" string.. so I double click the string once to get to the above, then I
  53. double clicked again and here is what I found:
  54.  
  55.  
  56. * Referenced by a CALL at Address:
  57. |:004382BD
  58. |
  59. :0043A740 56                      push esi
  60.  
  61. * Reference To: USER32.MessageBoxA, Ord:0197h
  62.                                   |
  63. :0043A741 8B35A0841D01            mov esi, dword ptr [011D84A0]
  64.  
  65. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  66. |:0043A76A(C)
  67. |
  68. :0043A747 E854FFFFFF              call 0043A6A0                     <-- The actual code that checks for the CD
  69. :0043A74C A37CAB4800              mov dword ptr [0048AB7C], eax
  70. :0043A751 83F8FF                  cmp eax, FFFFFFFF
  71.  
  72. * Possible StringData Ref from Data Obj ->"DAYTONA USA"
  73.                                   |
  74. :0043A754 A1B8AB4800              mov eax, dword ptr [0048ABB8]
  75. :0043A759 7515                    jne 0043A770
  76. :0043A75B 6A35                    push 00000035
  77. :0043A75D 50                      push eax
  78.  
  79. * Possible StringData Ref from Data Obj ->"Please insert DAYTONA USA CD."  <-- String that got us here
  80.                                   |
  81. :0043A75E 68CC624800              push 004862CC
  82. :0043A763 6A00                    push 00000000
  83. :0043A765 FFD6                    call esi
  84. :0043A767 83F802                  cmp eax, 00000002     <-- Hit cancel from dialog box
  85. :0043A76A 75DB                    jne 0043A747          <-- Otherwise loop up and check again
  86. :0043A76C 33C0                    xor eax, eax          <-- Set up to quit back to Win95
  87. :0043A76E 5E                      pop esi
  88. :0043A76F C3                      ret
  89.  
  90. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  91. |:0043A759(C)
  92. |
  93. :0043A770 B801000000              mov eax, 00000001    <-- The CD check passed!
  94. :0043A775 5E                      pop esi
  95. :0043A776 C3                      ret
  96.  
  97.     Now, let's check out the code the actually does check for the CD:
  98.  
  99. * Referenced by a CALL at Address:
  100. |:0043A747                                                  <-- Who called us (called only once)
  101. |
  102. :0043A6A0 83EC50                  sub esp, 00000050
  103. :0043A6A3 53                      push ebx
  104. :0043A6A4 56                      push esi
  105. :0043A6A5 57                      push edi
  106. :0043A6A6 33DB                    xor ebx, ebx                     <-- Initialize times through the CD check
  107. :0043A6A8 55                      push ebp
  108.  
  109. * Reference To: KERNEL32.GetLogicalDrives, Ord:00E7h               <-- Commonly used in CD checks
  110.                                   |                                <-- Search for this call VIA a text search
  111. :0043A6A9 FF15E4831D01            Call dword ptr [011D83E4]
  112. :0043A6AF 8BE8                    mov ebp, eax
  113.  
  114. * Reference To: KERNEL32._lopen, Ord:0262h
  115.                                   |
  116. :0043A6B1 8B35E8831D01            mov esi, dword ptr [011D83E8]
  117.  
  118. * Reference To: KERNEL32.GetDriveTypeA, Ord:00CEh                  <-- Also commonly used call in CD checks
  119.                                   |                                <-- Search for this call VIA a text search
  120. :0043A6B7 8B3DEC831D01            mov edi, dword ptr [011D83EC]
  121.  
  122. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  123. |:0043A70F(C)
  124. |
  125. :0043A6BD B801000000              mov eax, 00000001
  126. :0043A6C2 8ACB                    mov cl, bl
  127. :0043A6C4 D3E0                    shl eax, cl
  128. :0043A6C6 85C5                    test ebp, eax
  129. :0043A6C8 7441                    je 0043A70B
  130. :0043A6CA 8D4341                  lea eax, dword ptr [ebx+41]
  131. :0043A6CD 8D4C2410                lea ecx, dword ptr [esp+10]
  132. :0043A6D1 50                      push eax
  133.  
  134. * Possible StringData Ref from Data Obj ->"%c:\"                    <-- Commonly used REF in CD checks
  135.                                   |
  136. :0043A6D2 6834AF4800              push 0048AF34
  137. :0043A6D7 51                      push ecx
  138.  
  139. * Reference To: USER32.wsprintfA, Ord:026Ch
  140.                                   |
  141. :0043A6D8 FF15F8841D01            Call dword ptr [011D84F8]
  142. :0043A6DE 8D4C241C                lea ecx, dword ptr [esp+1C]
  143. :0043A6E2 83C40C                  add esp, 0000000C
  144. :0043A6E5 51                      push ecx
  145. :0043A6E6 FFD7                    call edi
  146. :0043A6E8 83F805                  cmp eax, 00000005
  147. :0043A6EB 751E                    jne 0043A70B
  148. :0043A6ED 8D442410                lea eax, dword ptr [esp+10]
  149.  
  150. * Possible StringData Ref from Data Obj ->"GAME\MINI\DAYTONA.EXE"  <-- Checking for the game file on the CD
  151.                                   |
  152. :0043A6F1 681CAF4800              push 0048AF1C
  153. :0043A6F6 50                      push eax
  154.  
  155. * Reference To: KERNEL32.lstrcatA, Ord:0266h
  156.                                   |
  157. :0043A6F7 FF1518841D01            Call dword ptr [011D8418]
  158. :0043A6FD 8D442410                lea eax, dword ptr [esp+10]
  159. :0043A701 6A00                    push 00000000
  160. :0043A703 50                      push eax
  161. :0043A704 FFD6                    call esi
  162. :0043A706 83F8FF                  cmp eax, FFFFFFFF
  163. :0043A709 7508                    jne 0043A713
  164.  
  165. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  166. |:0043A6C8(C), :0043A6EB(C)
  167. |
  168. :0043A70B 43                      inc ebx                          <-- Increase the count through the CD check
  169. :0043A70C 83FB20                  cmp ebx, 00000020                <-- Allow for 32 checks to fail
  170. :0043A70F 7CAC                    jl 0043A6BD
  171. :0043A711 EB11                    jmp 0043A724
  172.  
  173. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  174. |:0043A709(C)
  175. |
  176. :0043A713 8A4C2410                mov cl, byte ptr [esp+10]
  177. :0043A717 50                      push eax
  178. :0043A718 880D04524D00            mov byte ptr [004D5204], cl
  179.  
  180. * Reference To: KERNEL32._lclose, Ord:025Fh
  181.                                   |
  182. :0043A71E FF15F0831D01            Call dword ptr [011D83F0]
  183.  
  184. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  185. |:0043A711(U)
  186. |
  187. :0043A724 B8FFFFFFFF              mov eax, FFFFFFFF                <-- Set up for a good CD check (IE: it passed)
  188. :0043A729 83FB20                  cmp ebx, 00000020
  189. :0043A72C 7402                    je 0043A730                      <-- MUST take this jump for a good CD check
  190. :0043A72E 8BC3                    mov eax, ebx                     <-- Forces the CD check to fail
  191.  
  192. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  193. |:0043A72C(C)
  194. |
  195. :0043A730 5D                      pop ebp
  196. :0043A731 5F                      pop edi
  197. :0043A732 5E                      pop esi
  198. :0043A733 5B                      pop ebx
  199. :0043A734 83C450                  add esp, 00000050
  200. :0043A737 C3                      ret
  201.  
  202.     Now we have gone through the whole copy protection and I showed you the basic workings of the code that does the CD
  203. check.  We also saw the values for a pass and a failed CD check.  So the only thing left is to go back to the calling routine
  204. at 4382BD and disable it.. and that looks like this:
  205.  
  206. :004382BD E87E240000              call 0043A740   <-- Call to check for the CD
  207. :004382C2 85C0                    test eax, eax   <-- Check if it came back 0 or 1
  208. :004382C4 7507                    jne 004382CD    <-- Need to take this for the game to work
  209. :004382C6 33C0                    xor eax, eax
  210. :004382C8 E97F020000              jmp 0043854C    <-- Say "goodnight" (quit to Win95)
  211.  
  212. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  213. |:004382C4(C)
  214. |
  215. :004382CD E8CE390200              call 0045BCA0
  216. :004382D2 8B5D14                  mov ebx, dword ptr [ebp+14]
  217. :004382D5 53                      push ebx
  218. :004382D6 57                      push edi
  219. :004382D7 E814FDFFFF              call 00437FF0
  220. :004382DC 83C408                  add esp, 00000008
  221. :004382DF 85C0                    test eax, eax
  222. :004382E1 750C                    jne 004382EF
  223. :004382E3 E8D8FAFFFF              call 00437DC0
  224. :004382E8 33C0                    xor eax, eax
  225. :004382EA E95D020000              jmp 0043854C
  226.  
  227.     So now we have the info it takes to crack this game.  Well we don't want to have to have the CD present just to play a
  228. game or two, so simply overwrite the call 0043A740 with mov eax, 00000001 (B8 01 00 00 00) and this will force the conditional
  229. jump to always be taken.  This way the actual CD check code is never run and the game will continue even if you don't have the
  230. CD in your CD-ROM drive.  The actual edit would be as follows:
  231.  
  232.  
  233. Edit DAYTONA.exe at offset 227,005
  234. ==================================
  235. Search for:E8 7E 24 00 00
  236. Change to :B8 01 00 00 00
  237.  
  238.  
  239. or search for: 85 C0 75 07 33 C0 E9 and back up 5 bytes (to the 'E8') and make the above change.  Now you wont need to insert the
  240. CD to play Daytona USA Hope you learned something here...  I know I did...  Now Daytona USA is FiX'ed
  241.  
  242. Static Vengeance
  243.